package utils;

import javax.jms.Connection;
import javax.jms.JMSException;

import org.apache.activemq.ActiveMQConnectionFactory;

public class ActiveMq {
	public static final String ACTIVEMQ_URL;
	public static final String TOPIC_NAME;
	private static ActiveMQConnectionFactory activeMQConnectionFactory;

	static {
		ACTIVEMQ_URL = "tcp://127.0.0.1:61616";
		TOPIC_NAME = "queue";
		activeMQConnectionFactory = new ActiveMQConnectionFactory(ACTIVEMQ_URL);
	}

	public static Connection getConnection() throws JMSException {
		return activeMQConnectionFactory.createConnection();

	}

}